	/**
	 * 这个文件是适配小程序的头部的, 包括微信小程序, 抖音小程序
	 * @author baishaojun
	 * @date 2024/7/1
	 */
	const SYSTEM_INFO = uni.getSystemInfoSync()
	export const getStatusBarHeight = ()=>SYSTEM_INFO.statusBarHeight || 15
	
	export const getTitleBarHeight = ()=>{
		/**
		 * 有胶囊按钮
		 */
		if(uni.getMenuButtonBoundingClientRect){
			const {top,height } = uni.getMenuButtonBoundingClientRect()
			let titleBarHeight =(top - getStatusBarHeight())*2 + height
			return titleBarHeight;
		}else{
			return 40
		}
	}
	
	export const getNavbarHeight = ()=>getStatusBarHeight()+getTitleBarHeight()
	
	/**
	 * 以下是处理抖音小程序
	 */
	export const getLeftIconLeft = ()=>{
		// #ifdef MP-TOUTIAO
		let {leftIcon:{left,width}} = tt.getCustomButtonBoundingClientRect()
		return left + parseInt(width)
		// #endif
		
		// #ifndef MP-TOUTIAO
		return 0
		// #endif
	} 